<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form action="" method="post"> {% csrf_token%}
        username:<input type="text" name="username">
        password:<input type="password" name="password">
        <input type="submit" value="login">
    </form>
    {% if login_error %}
        <div class="alert alert-danger" role="alert">用户名或密码错误</div>
    {% endif %}
</body>
</html>
